//当页面向下滑动出现“Top”按钮
window.onscroll = function () { scrollFunction() ;navFunction();}

function scrollFunction() {
    if (document.body.scrollTop > 1000 || document.documentElement.scrollTop > 20) {
        document.getElementById("to_top").style.display = "block";
    } else {
        document.getElementById("to_top").style.display = "none";
    }

}
//点击按钮，返回顶部
function topFunction() {
    document.body.scrollTop = 0;
    document.documentElement.scrollTop = 0;
}

//左导航栏点击改变颜色
$(document).ready(function(){
    $("#leftd a").click(function(){
        $(this).siblings('a').removeClass('station');  // 删除其他兄弟元素的样式
        $(this).addClass('station');
        console.log('open');
    })
 })

 function navFunction(){
    if(document.documentElement.scrollTop > 109){
        document.getElementById("leftd").style.position = "fixed";
    }else{
        document.getElementById("leftd").style.position = "static";
    }
 }

 $(".dropdown-item").mousedown(function(){
    console.log("aa");
    $(this).css("background-color","#f8f9fa");
    $(this).css("color","#000000");
   
  })
  $(".dropdown-item").mouseup(function(){
    console.log("aa");
    $(this).css("background-color","transparent");
   
  })
 










